<section id="dropped">
    <div class="page-header">
        <h1>Dropped Files <small>files created or deleted by the malware</small></h1>
    </div>
    <%
        counter = 1
        dropped_total = len(dropped_all) + len(dropped_unique) + len(dropped_varied)
    %> 
    <div class="page-header">
        <h2> ${dropped_total} Total different dropped files </h2>
    </div>             
    %if dropped_all:
        <div>
            <h3><a href="javascript:showHide('dropped_all');">${len(dropped_all)} Files were dropped in all executions</a></h3>
            <div id="dropped_all" style="display: none;">                 
        
        %for dropped_file in dropped_all:
            <div>
                <h3><a href="javascript:showHide('dropped_${counter}');">${dropped_file["name"]}</a></h3>
                <div id="dropped_${counter}" style="display: none;">
                    <table class="table table-striped table-bordered">
                        <colgroup>
                            <col width="150" />
                            <col width="*" />
                        </colgroup>
                        <tr>
                            <td><strong>File name</strong>:</td>
                            <td><span class="mono">${dropped_file["name"]}</span></td>
                        </tr>
                        <tr>
                            <td><strong>File size</strong>:</td>
                            <td><span class="mono">${dropped_file["size"]} bytes</span></td>
                        </tr>
                        <tr>
                            <td><strong>File type</strong>:</td>
                            <td><span class="mono">${dropped_file["type"]}</span></td>
                        </tr>
                        <tr>
                            <td><strong>MD5</strong>:</td>
                            <td><span class="mono">${dropped_file["md5"]}</span></td>
                        </tr>
                        <tr>
                            <td><strong>SHA1</strong>:</td>
                            <td><span class="mono">${dropped_file["sha1"]}</span></td>
                        </tr>
                        <tr>
                            <td><strong>SHA256</strong>:</td>
                            <td><span class="mono">${dropped_file["sha256"]}</span></td>
                        </tr>
                        <tr>
                            <td><strong>SHA512</strong>:</td>
                            <td><span class="mono">${dropped_file["sha512"]}</span></td>
                        </tr>
                        <tr>
                            <td><strong>Ssdeep</strong>:</td>
                            <td><span class="mono">${dropped_file["ssdeep"]}</span></td>
                        </tr>
                        %if dropped_file["same_as"]:
                            <tr>
                                <td><strong>Same as</strong>:</td>
                                <td><span class="mono"> </span></td>
                            </tr> 
                            <%
                                counter_same = 1
                            %>                         
                            %for same in dropped_file["same_as"]:
                                <tr> 
                                    <td> ${counter_same}. </td>                           
                                    <td><span class="mono"> ${same["name"]} in analysis ${same["in_analysis"]}</span></td>
                                </tr>
                                <%
                                    counter_same += 1    
                                %>
                            %endfor
                        %endif                             

                        %if dropped_file["repeated"] > 0:
                            <tr>
                                <td><strong>Repeated</strong>:</td>
                                <td><span class="mono">${dropped_file["repeated"]} times</span></td>
                            </tr>
                        %endif                                    
                    </table>
                </div>
            </div>
            <%
                counter += 1
            %>
        %endfor
        </div>
    %else:
        <h3>0 Files were dropped in all executions.</h3>
    %endif   
                                    
    %if dropped_unique:
        <div>
            <h3><a href="javascript:showHide('dropped_unique');">${len(dropped_unique)} Files were dropped in only one execution</a></h3>
            <div id="dropped_unique" style="display: none;">   
      
        %for dropped_file in dropped_unique:
            <div>
                <h3><a href="javascript:showHide('dropped_${counter}');">${dropped_file["name"]}</a></h3>
                <div id="dropped_${counter}" style="display: none;">
                    <table class="table table-striped table-bordered">
                        <colgroup>
                            <col width="150" />
                            <col width="*" />
                        </colgroup>
                        <tr>
                            <td><strong>File name</strong>:</td>
                            <td><span class="mono">${dropped_file["name"]}</span></td>
                        </tr>
                        <tr>
                            <td><strong>File size</strong>:</td>
                            <td><span class="mono">${dropped_file["size"]} bytes</span></td>
                        </tr>
                        <tr>
                            <td><strong>File type</strong>:</td>
                            <td><span class="mono">${dropped_file["type"]}</span></td>
                        </tr>
                        <tr>
                            <td><strong>MD5</strong>:</td>
                            <td><span class="mono">${dropped_file["md5"]}</span></td>
                        </tr>
                        <tr>
                            <td><strong>SHA1</strong>:</td>
                            <td><span class="mono">${dropped_file["sha1"]}</span></td>
                        </tr>
                        <tr>
                            <td><strong>SHA256</strong>:</td>
                            <td><span class="mono">${dropped_file["sha256"]}</span></td>
                        </tr>
                        <tr>
                            <td><strong>SHA512</strong>:</td>
                            <td><span class="mono">${dropped_file["sha512"]}</span></td>
                        </tr>
                        <tr>
                            <td><strong>Ssdeep</strong>:</td>
                            <td><span class="mono">${dropped_file["ssdeep"]}</span></td>
                        </tr>
                        <tr>
                            <td><strong>Dropped</strong>:</td>
                            <td><span class="mono">in ${len(dropped_file["analysis"])} out of ${len(executions_info)} executions</span></td>
                        </tr>                         
                        <%
                            counter_analysis = 1    
                        %>
                        <tr>
                            <td><strong>Dropped in analysis</strong>:</td>
                            <td><span class="mono"> </span></td>
                        </tr>    
                        %for analysis in dropped_file["analysis"]: 
                            <tr> 
                                <td> ${counter_analysis}. </td>                           
                                <td><span class="mono"> ${analysis}</span></td>
                            </tr>
                            <%
                                counter_analysis += 1    
                            %>
                        %endfor
                                               
                        %if dropped_file["same_as"]:
                            <tr>
                                <td><strong>Same as</strong>:</td>
                                <td><span class="mono"> </span></td>
                            </tr> 
                            <%
                                counter_same = 1
                            %>                         
                            %for same in dropped_file["same_as"]:
                                <tr> 
                                    <td> ${counter_same}. </td>                           
                                    <td><span class="mono"> ${same["name"]} in analysis ${same["in_analysis"]}</span></td>
                                </tr>
                                <%
                                    counter_same += 1    
                                %>
                            %endfor
                        %endif                             

                        %if dropped_file["repeated"] > 0:
                            <tr>
                                <td><strong>Repeated</strong>:</td>
                                <td><span class="mono">${dropped_file["repeated"]} times</span></td>
                            </tr>
                        %endif                                                                      
                    </table>
                </div>
            </div>
            <%
                counter += 1
            %>
        %endfor
        </div>
    %else:
        <h3>0 Files were uniquely dropped </h3>.
    %endif   
                    
    %if dropped_varied:
        <div>
            <h3><a href="javascript:showHide('dropped_varied');">${len(dropped_varied)} Files were dropped in various executions</a></h3>
            <div id="dropped_varied" style="display: none;">                  
       
        %for dropped_file in dropped_varied:
            <div>
                <h3><a href="javascript:showHide('dropped_${counter}');">${dropped_file["name"]}</a></h3>
                <div id="dropped_${counter}" style="display: none;">
                    <table class="table table-striped table-bordered">
                        <colgroup>
                            <col width="150" />
                            <col width="*" />
                        </colgroup>
                        <tr>
                            <td><strong>File name</strong>:</td>
                            <td><span class="mono">${dropped_file["name"]}</span></td>
                        </tr>
                        <tr>
                            <td><strong>File size</strong>:</td>
                            <td><span class="mono">${dropped_file["size"]} bytes</span></td>
                        </tr>
                        <tr>
                            <td><strong>File type</strong>:</td>
                            <td><span class="mono">${dropped_file["type"]}</span></td>
                        </tr>
                        <tr>
                            <td><strong>MD5</strong>:</td>
                            <td><span class="mono">${dropped_file["md5"]}</span></td>
                        </tr>
                        <tr>
                            <td><strong>SHA1</strong>:</td>
                            <td><span class="mono">${dropped_file["sha1"]}</span></td>
                        </tr>
                        <tr>
                            <td><strong>SHA256</strong>:</td>
                            <td><span class="mono">${dropped_file["sha256"]}</span></td>
                        </tr>
                        <tr>
                            <td><strong>SHA512</strong>:</td>
                            <td><span class="mono">${dropped_file["sha512"]}</span></td>
                        </tr>
                        <tr>
                            <td><strong>Ssdeep</strong>:</td>
                            <td><span class="mono">${dropped_file["ssdeep"]}</span></td>
                        </tr>
                        <tr>
                            <td><strong>Dropped</strong>:</td>
                            <td><span class="mono">in ${len(dropped_file["analysis"])} out of ${len(executions_info)} executions</span></td>
                        </tr>   
                        <%
                            counter_analysis = 1    
                        %>
                        <tr>
                            <td><strong>Dropped in analysis</strong>:</td>
                            <td><span class="mono"> </span></td>
                        </tr>    
                        %for analysis in dropped_file["analysis"]: 
                            <tr> 
                                <td> ${counter_analysis}. </td>                           
                                <td><span class="mono"> ${analysis}</span></td>
                            </tr>
                            <%
                                counter_analysis += 1    
                            %>
                        %endfor
                                               
                        %if dropped_file["same_as"]:
                            <tr>
                                <td><strong>Same as</strong>:</td>
                                <td><span class="mono"> </span></td>
                            </tr> 
                            <%
                                counter_same = 1
                            %>                         
                            %for same in dropped_file["same_as"]:
                                <tr> 
                                    <td> ${counter_same}. </td>                           
                                    <td><span class="mono"> ${same["name"]} in analysis ${same["in_analysis"]}</span></td>
                                </tr>
                                <%
                                    counter_same += 1    
                                %>
                            %endfor
                        %endif                             

                        %if dropped_file["repeated"] > 0:
                            <tr>
                                <td><strong>Repeated</strong>:</td>
                                <td><span class="mono">${dropped_file["repeated"]} times</span></td>
                            </tr>
                        %endif     
                    </table>
                </div>
            </div>
            <%
                counter += 1
            %>
        %endfor
        </div>
    %else:
        <h3>0 Files were dropped in various executions.</h3>
    %endif
    %if dropped_repeated > 0:
        <h3>${dropped_repeated} Files were repeated inside the same execution.</h3>
    %endif  
</section>
